intel: platform: use Kconfig for IDC stack size#11031
intel: platform: use Kconfig for IDC stack size#11031serhiy-katsyuba-intel wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR aligns Intel platform stack sizing with the existing Kconfig setting by defining SOF_STACK_SIZE in terms of CONFIG_SOF_STACK_SIZE (instead of a hard-coded 0x1000). This makes the IDC worker thread stack size follow board/overlay configuration (e.g., PTL/MTL DAX overlays increasing it to 8192), matching how multiple other platforms already derive SOF_STACK_SIZE.
Changes:
- Replace hard-coded
SOF_STACK_SIZE(4KB) withCONFIG_SOF_STACK_SIZEon Meteorlake, Lunarlake, and ACE30. - Ensure IDC worker thread stack sizing tracks Kconfig/overlay adjustments for affected Intel targets.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/platform/meteorlake/include/platform/lib/memory.h | Switch SOF_STACK_SIZE to use CONFIG_SOF_STACK_SIZE for MTL. |
| src/platform/lunarlake/include/platform/lib/memory.h | Switch SOF_STACK_SIZE to use CONFIG_SOF_STACK_SIZE for LNL. |
| src/platform/ace30/include/platform/lib/memory.h | Switch SOF_STACK_SIZE to use CONFIG_SOF_STACK_SIZE for ACE30. |
|
|
||
| /* Stack configuration */ | ||
| #define SOF_STACK_SIZE 0x1000 | ||
| #define SOF_STACK_SIZE (CONFIG_SOF_STACK_SIZE) |
There was a problem hiding this comment.
I don't think parentheses are needed. The Kconfig parameter resolves to just a constant, doesn't it?
There was a problem hiding this comment.
also not sure why an increase to 8K is needed? Were 4K not enough in some cases? Maybe it needs a new Kconfig?
There was a problem hiding this comment.
I don't think parentheses are needed. The Kconfig parameter resolves to just a constant, doesn't it?
Pushed a new version with removed parentheses.
also not sure why an increase to 8K is needed? Were 4K not enough in some cases? Maybe it needs a new Kconfig?
CONFIG_SOF_STACK_SIZE default value in Kconfig is 4096. But on ACE3 and NVL boards it is redefined to 8192. Probably, somebody already tested there and decided the default 4096 is not enough. SOF_STACK_SIZE was defined as 0x1000 in ace3 memory.h, that define is only used to configure IDC worker tread stack size. So on PTL (and some other platforms with overlays) this change will increase IDC stack size to be the same size as other stacks: LL, IPC, DP.
I think adding many config options for stack sizes is excessive. We can assume the requirements for LL, IPC, DP and IDC stacks are about the same and just use one CONFIG_SOF_STACK_SIZE.
On Intel platforms, SOF_STACK_SIZE is only used to define the IDC worker thread stack size. However, a Kconfig option, CONFIG_SOF_STACK_SIZE, already exists. On some platforms, the IDC worker thread stack size was hard-coded in memory.h, which appears to have been an oversight. The default value of CONFIG_SOF_STACK_SIZE is 4096, but it is increased to 8192 for the PTL board and in some overlays, such as the MTL DAX overlay. Therefore, this change also increases the IDC worker thread stack size for those configurations. Signed-off-by: Serhiy Katsyuba <[email protected]>
c7d5950 to
a1c0510
Compare
On Intel platforms, SOF_STACK_SIZE is only used to define the IDC worker thread stack size. However, a Kconfig option, CONFIG_SOF_STACK_SIZE, already exists. On some platforms, the IDC worker thread stack size was hard-coded in memory.h, which appears to have been an oversight.
The default value of CONFIG_SOF_STACK_SIZE is 4096, but it is increased to 8192 for the PTL board and in some overlays, such as the MTL DAX overlay. Therefore, this change also increases the IDC worker thread stack size for those configurations.